package com.example.ssoapp1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * LogoutController
 *
 * @author majun
 * @description LogoutController
 * @date 2021/9/13
 */
@Controller
public class LogoutController {

    @ResponseBody
    @PostMapping(value = "logout")
    public void logout(HttpSession session) {
        session.invalidate();
    }

}
